Class HTTPClientImpl

All Implemented Interfaces:
IPCObject, HTTPClient, Process
Direct Known Subclasses:
HTTPBackgroundClientImpl

public class HTTPClientImpl extends ProcessImpl implements HTTPClient
Information provided by the PKI file:

    \class HttpClient
    
    \brief HttpClient handles and manipulates the HTTP client on devices.
    
    \example network().getDevice("PC0").getProcess("HttpClient")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • go

      public boolean go(String url)
      Information provided by the PKI file:
      
          \brief Creates an HTTP request to the specified URL.
          
          \param url, the URL of the destination.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      go in interface HTTPClient
      Parameters:
      url - Takes in a parameter of url
      Returns:
      boolean Returns a boolean
    • http_get

      public boolean http_get(String url, String header)
      Specified by:
      http_get in interface HTTPClient
      Parameters:
      url - Takes in a parameter of url
      header - Takes in a parameter of header
      Returns:
      boolean Returns a boolean
    • http_post

      public boolean http_post(String url, String body, String header)
      Specified by:
      http_post in interface HTTPClient
      Parameters:
      url - Takes in a parameter of url
      body - Takes in a parameter of body
      header - Takes in a parameter of header
      Returns:
      boolean Returns a boolean
    • http_delete

      public boolean http_delete(String url, String body, String header)
      Specified by:
      http_delete in interface HTTPClient
      Parameters:
      url - Takes in a parameter of url
      body - Takes in a parameter of body
      header - Takes in a parameter of header
      Returns:
      boolean Returns a boolean
    • http_put

      public boolean http_put(String url, String body, String header)
      Specified by:
      http_put in interface HTTPClient
      Parameters:
      url - Takes in a parameter of url
      body - Takes in a parameter of body
      header - Takes in a parameter of header
      Returns:
      boolean Returns a boolean
    • cancel

      public boolean cancel()
      Information provided by the PKI file:
      
          \brief cancel HTTP request and close tcp connection.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      cancel in interface HTTPClient
      Returns:
      boolean Returns a boolean
    • getLastPageContent

      public String getLastPageContent()
      Information provided by the PKI file:
      
          \brief Returns the last page content retrived from an HTTP response.
          
          \return string, the last page content retrived from an HTTP response.
          
              
      Specified by:
      getLastPageContent in interface HTTPClient
      Returns:
      String Returns a String
    • setHttps

      public void setHttps(boolean status)
      Information provided by the PKI file:
      
          \brief Sets the HttpClient process to use HTTPS if status is true, otherwise HTTP.
          
          \param status, true if HTTPS, false if HTTP.
          
              
      Specified by:
      setHttps in interface HTTPClient
      Parameters:
      status - Takes in a parameter of status
    • isHttps

      public boolean isHttps()
      Information provided by the PKI file:
      
          \brief Returns true if the HttpClient process is set to HTTPS, false if HTTP.
          
          \return bool, true if the HttpClient process is set to HTTPS, false if HTTP.
          
              
      Specified by:
      isHttps in interface HTTPClient
      Returns:
      boolean Returns a boolean